<script>
function state(str)
{
if (str=="")
  {
  document.getElementById("txtHint").innerHTML="";
  return;
  }
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {

    document.getElementById("txtHint").innerHTML=xmlhttp.responseText;
	//alert(xmlhttp.responseText);
    }
  }
  
xmlhttp.open("GET","getcity.php?q="+str,true);
xmlhttp.send();
}


function cat(str)
{
	
if (str=="")
  {
	 
  document.getElementById("txtHint1").innerHTML="<select name='subcat'  style='width:220px;'><option>Select SubCategory</option></select>";
  return;
  }
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {

    document.getElementById("txtHint1").innerHTML=xmlhttp.responseText;
    }
  }
  
xmlhttp.open("GET","getsubcat.php?q="+str,true);
xmlhttp.send();
}
</script>
<style type="text/css">
#radientbox {
    -moz-border-radius-bottomright:5px;
	-moz-border-radius-topleft:5px;
	-webkit-border-bottom-right-radius:5px;
	-webkit-border-top-left-radius:5px;
    background-image: -moz-linear-gradient(center bottom , #FFFFFF 15%, #E1F1FC 85%);
    border-color: #BFE7FF #BFE7FF -moz-use-text-color;
	border:2px solid #BFE7FF;
    height: auto;
    margin-top: 10px;
    padding-top: 1px;	
}
.searchbg {
    background-image:url(images/search.png);
	background-repeat:no-repeat;
    height: 29px;
	border:0px;
	width:106px;	
}
</style>
	<!-- Begin contentwarpMiddle -->
      <div class="contentwarpMiddle" style="width:100%">
      <div class="TechnologyTbl" style=" width:800px; background-color:#FFF; border:0px; padding:3px 3px 3px 30px;">
      <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="47%" align="center" valign="top">
    <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" id="radientbox">
	   <form action="index.php" id="layout" method="get" name="searchfrm">
	   <input type="hidden" name="page" value="jobs">
	   <input type="hidden" name="view" value="view_ad_search">
	   <tr>
	     <td height="30" colspan="2" align="left" valign="middle" class="font12" style="font-size:16px; font-weight:bold; padding-left:5px;">Find Jobs</td>
	     </tr>
	   <tr><td colspan="2" align="left" valign="middle" style=" padding-left:5px;">
       <input type="text" value="" name="keyword" class="searchborder" style="width:350px;" onfocus="this.value='';" ></td>
	   </tr>
	   <tr>
	   <!-- <td><input type="submit" value="keyword" name="keyword" onfocus="this.value='';" ></td> -->
	   <td align="left" valign="middle">
			
		</td>
	   <td align="left" valign="middle">
   
</td>
	   </tr>
	   <tr>
	     <td height="30" colspan="2" align="left" valign="middle" style=" padding-left:5px;">
	       <select name="id" id="Category" class="searchborder" style="width:220px;" onchange="return cat(this.value)">
	         <option value="">Select Category</option>
	         <?php  
		 $ads=mysql_query("select * from job_category where active_status='1' order by id ASC");
		 while($tech=mysql_fetch_array($ads)){
		  ?>
	         <option <?php if($row['cat_id']==$tech['id']){echo "selected";}?> value="<?php echo $tech['id']?>"> <?php echo $tech['category']?></option>
	         <?php }?>
	         </select></td>
	     </tr>
	   <tr>
	     <td align="left" valign="middle">
	       
	       </td>
	     <td align="left" valign="middle">
	       
	       </td>
	     </tr>
	   <tr>
	     <td colspan="2" align="left" valign="middle" style=" padding-left:5px;">
         <select name="jid" id="zone" class="searchborder" style="width:220px;" onchange="return state(this.value)"  >
	       <option value="">Select Zone </option>
	       <?php 
$ads=mysql_query("select * from zone where active_status='1' order by id ASC");
while($tech=mysql_fetch_array($ads)){
	
	?>
	       <option <?php if($row['zone_id']==$tech['id']){echo "selected";}?> value="<?php echo $tech['id']?>"> <?php echo $tech['zone_name']?></option>
	       <?php }?>
	       </select></td>
	     </tr>
	   <tr>
	     <td colspan="2" align="left" valign="middle" style=" padding-left:5px;">
	       <div id="txtHint1">
	         <select name="subcat" class="searchborder"  style="width:220px;"> 
	           <option value="">--Select SubCategory--</option>
	           <?php 
			
		 $ads=mysql_query("select * from job_subcategory where 	id='".$row['sub_cat_id']."' and active_status='1' order by id ASC");
		while($tech=mysql_fetch_array($ads)){
			
			?> 
	           
	           
	           <option  <?php if($row['sub_cat_id']==$tech['id']){echo "selected";}?> value="<?php echo $tech['id']?>">
	             <?php echo $tech['sub_cat_name'];?>
	             </option>  <?php }?>
	           </select>
	         </div>
	       </td>
	     </tr>
	   <tr>
	     <td colspan="2" align="left" valign="middle" style=" padding-left:5px;">
	       <div id="txtHint">
	         <select name="city" class="searchborder" style="width:220px;"  >
	           <option value="">--Select City--</option>
	           <?php 
	
 $ads=mysql_query("select * from city where zone_id='".$row['zone_id']."' and active_status='1' order by city_id ASC");
while($tech=mysql_fetch_array($ads)){
	
	?>
	           <option <?php if($row['city_id']==$tech['city_id']){echo "selected";}?>  value="<?php echo  $tech['city_id'];?>">
	             <?php //echo $str;?>
	             <?php echo $tech['city_name'];?>
	             </option> 
	           <?php } ?>
	           </select>
	         </div>
	       </td>
	     </tr>
	   <tr>
	     <td height="40" colspan="2" align="right" valign="middle" style=" padding-right:5px;">
	       <input type="submit" class="searchbg" value="" name="Search" /></td>
	     </tr>
	   </form>
	   </table>
    </td>
    <td width="6%" align="center" valign="top">&nbsp;</td>
    <td width="47%" align="center" valign="top">
    <div class="bb-location clearfix" id="radientbox">
        <h2>Search by Location</h2>
        <p>Find jobs in Sydney, Melbourne, Brisbane, Perth, Adelaide, Canberra and more.</p>
        <div class="contentArea1">
       
          <div class="browse-capital clearfix">
            <ul>
			<?php 
                       
            $sql="select distinct(z.zone_name),z.id from zone z inner join job_post jp on z.id=jp.zone_id where jp.active_status='1'";
            $sql=mysql_query($sql);
            $count=mysql_num_rows($sql);
            while($tech=mysql_fetch_array($sql))
            {
            echo '<li style="padding-left:50px;">&bull;&nbsp; <a href="index.php?page=jobs&view=view_job&jid='.$tech['id'].'">'.$tech['zone_name'].'<br></a></li>';
            }
            ?>
            </ul>
          </div>
          
        </div>
     <div class="contentArea2 mapWrap">
          <div class="mapAusSmall"> <span class="mapAusSmallWa">
          <a href="index.php?page=jobs&view=view_job&a_id=Western%20Australia" title="Western Australia"></a></span> <span class="mapAusSmallNt">
          <a href="index.php?page=jobs&view=view_job&a_id=Northern%20Territory" title="Northern Territory"></a></span> <span class="mapAusSmallQu">
          <a href="index.php?page=jobs&view=view_job&a_id=Queensland" title="Queensland"></a></span> <span class="mapAusSmallSa">
          <a href="index.php?page=jobs&view=view_job&a_id=South%20Australia" title="South Australia"></a></span> <span class="mapAusSmallNsw">
          <a href="index.php?page=jobs&view=view_job&a_id=New%20South%20Wales" title="New South Wales"></a></span> <span class="mapAusSmallVic">
          <a href="index.php?page=jobs&view=view_job&a_id=Victoria" title="Victoria"></a></span> <span class="mapAusSmallAct">
          <a href="index.php?page=jobs&view=view_job&a_id=Australian%20Capital%20Territory" title="Australian Capital Territory"></a>
          </span> <span class="mapAusSmallTas">
          <a href="index.php?page=jobs&view=view_job&a_id=Tasmania" title="Tasmania"></a></span> </div>
        </div>
      </div>
    </td>
  </tr>
  <tr>
    <td align="center" valign="top">&nbsp;</td>
    <td align="center" valign="top">&nbsp;</td>
    <td align="center" valign="top">&nbsp;</td>
  </tr>
  <tr>
    <td align="center" valign="top">&nbsp;</td>
    <td align="center" valign="top">&nbsp;</td>
    <td align="center" valign="top">&nbsp;</td>
  </tr>
</table>
      <div style="clear:both;"></div>
      <div class="bb-sector">
        <h2>Search by Sector</h2>  <div style="clear:both;"></div>
        <p>Find jobs in Accounting, Engineering, Hospitality and more. Check out the latest job vacancies in your sector.</p>  <div style="clear:both;"></div>
        <div class="featurebox clearfix">
          <ul>
           
			<?php 
            
            $sql="select distinct(c.category),c.id from job_category c inner join job_post jp on c.id=jp.cat_id 
            where  jp.active_status='1' order by c.category asc " ;
            $sql=mysql_query($sql);
            $count=mysql_num_rows($sql);
            while($tech=mysql_fetch_array($sql))
            {
            echo '<li style="padding-left:50px;">&bull;&nbsp; <a href="index.php?page=jobs&view=view_job&id='.$tech['id'].'" class="job">'.$tech['category'].'<br></a></li>';
            }
            ?>
          </ul>
        </div>
      </div>
      <div class="whos-hiring">
       
        
      </div>
     
    </div>
    
      </div>
     
     
     